<?php
?>
<table border='1' cellpadding='0' cellspacing='0' width='98%' align='center' style="border:5;">
    <tr height='30px' align='center'>
        <th width='200px'>Documento</th>
        <th >Correlativo</th>
        <th width='110px'>Aplica F. Libre</th>
        <th width='280px'>Forma Libre a Usar</th>
    </tr>
<?php 
    foreach ($doc as $data) {
        $nom='numero_'.$data['Documento']['id'];
        $apl_for='aplica_'.$data['Documento']['id'];
        $ser='serial_'.$data['Documento']['id'];
        $div='div_'.$data['Documento']['id'];
        
?>
    <tr height='30px'>
        <td><?php echo $data['Documento']['nombre'].' ('.$data['Documento']['prefijo'].')';?></td>
        <td><?php echo $this->Interfaz->input($nom, 10, 'numerico', 'inputn', 0, 20, '', 0, 1, 'NUMERO DONDE INICIA LA SECUENCIA DE CORRELATIVO PARA EL DOCUMENTO', '1'); ?></td>
        <td><?php $options = array(1=>array(1 => 1),2=>array(0 => 0));?>
            <span class="labeln">Si:</span> <?php echo $this->Interfaz->radio($apl_for, $options[1], 0,array('onchange'=>"habilita('$div')"));?>
            <span class="labeln">No:</span> <?php echo $this->Interfaz->radio($apl_for, $options[2], 0,array('onchange'=>"habilita('$div')"));?>
        </td>
        <td>
            <div id='<?php echo $div;?>' style='display:none;'>
            <?php echo $this->Interfaz->select($ser, 12, 'selectn', $listaSerial, '', 'Forma libre a ser Utilizada', 0, 1,array('style' => 'width: 130px'));?>
            </div>
       </td>
    </tr>
<?php
    }
?>
</table>
<br />